package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * @author sunyamei
 * @version V1.0
 * @Project springmvc_Demo
 * @Package com.qf.controller
 * @Description:
 * @Date 2022/7/14 19:59
 */
@Controller
@RequestMapping("/captcha")
public class CaptchaController {

    @RequestMapping("/test01")
    public void test01(String captcha, HttpSession session){
        //对比
        String realCap=(String)session.getAttribute("captcha");
        if(realCap.equalsIgnoreCase(captcha)){
            System.out.println("success");
        }else{
            System.out.println("fail");
        }
    }

}
